//
//  ViewController.m
//  HRSNetWorking
//
//  Created by huangrensheng on 16/4/18.
//  Copyright © 2016年 laber. All rights reserved.
//

#import "ViewController.h"
#import "HRSRequestNetWorking.h"
#import "Masonry.h"
#import "HDPercentageView.h"

@interface ViewController ()

@property (nonatomic, strong) HRSRequestNetWorking *netWorking;

@property (nonatomic, strong) HDPercentageView *percentView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.netWorking = [[HRSRequestNetWorking alloc] init];
    
//    self.percentView = [[HDPercentageView alloc] init];
//    [self.view addSubview:self.percentView];
//    [self.percentView mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.leading.and.trailing.equalTo(self.view);
//        make.top.equalTo(self.view.mas_top).equalTo(@80);
//        make.height.equalTo(@250);
//    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)netClick:(id)sender {
    NSDictionary *params =[NSDictionary dictionaryWithObjectsAndKeys:@"1",@"id",nil];
    [self.netWorking postWithUrl:@"http://localhost:8080/bbsServices/userInfo.do" params:params callBack:^(NSData *data, NSURLResponse *resopnse, NSError *error) {
        NSDictionary *dict =[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves  error:nil];
        NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        NSLog(@"%@----s%@",dict,string);
    }];
}

@end
